<?php
require_once APPLICATION_PATH . '/modules/dig/Exception.php';
/**
 * 
 * Digitalus2 CMS
 *
 * @package    	Digitalus\Core
 * @copyright  	Copyright (c) 2009,  Digitalus Media USA (http://digitalusmedia.net)
 * @license    	New BSD License, library/Dig/License.txt
 * @version 	2.0
 * 
 */
class Dig_Bootstrap extends Zend_Application_Module_Bootstrap 
{    
    /**
     * confirm that all of the required modules are installed
     *
     */
    protected function _initDependencies()
    {
        Dig_Service_Module::exists(array(
            'digUser',
            'digCms',
            'digNavigation',
            'digContent',
            'digUi'),
            true // throw an exception if the module does not exist
        );
    }

    /**
     * you enable and disable the profiler by setting the Dig module
     * config flag 'enableProfiler' to true
     */
    protected function _initProfiler()
    {
        if(Dig_Service_Module::settings('dig', 'enableProfiler') == true) {
            $adapter = Zend_Db_Table::getDefaultAdapter();
            $adapter->getProfiler()->setEnabled(true);
        }
    }
}
?>